﻿namespace Jlvier.TaobaoShowcase.Service
{
    public class APIInvokeMonitor
    {
        private static APIInvokeMonitor instance;
        private static readonly object lockObject = new object();


        private APIInvokeMonitor()
        {}

        public static APIInvokeMonitor Instance
        {
            get
            {
                if (null == instance)
                {
                    lock(lockObject)
                    {
                        if (null == instance)
                            instance = new APIInvokeMonitor();
                    }
                }
                return instance;
            }
        }

        public long Count { get; set; }
        public void Clear()
        {
            Count = 0;
        }
        public void Delay()
        {
            System.Threading.Thread.Sleep(1000);
        }

    }
}